From 0f096d6ad99330b73c34370f15aff39190539a19 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 25 May 2020 17:18:27 -0400 Subject: [PATCH] bitmask: add an assertion The static analysis in ci is complaining about this, since it doesn't know that start is always smaller than end. --- gtk/gtkbitmaskprivateimpl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkbitmaskprivateimpl.h b/gtk/gtkbitmaskprivateimpl.h index 3a16e178fc..d9598528c5 100644 --- a/gtk/gtkbitmaskprivateimpl.h +++ b/gtk/gtkbitmaskprivateimpl.h @@ -124,6 +124,8 @@ _gtk_bitmask_invert_range (GtkBitmask *mask, guint start, guint end) { + g_assert (start <= end); + if (_gtk_bitmask_is_allocated (mask) || (end > GTK_BITMASK_N_DIRECT_BITS)) return _gtk_allocated_bitmask_invert_range (mask, start, end); -- 2.30.2